package web;


import spring.cloud.tasks.client.Client;

import javax.servlet.http.HttpServletRequest;

public class managerFactoryDeal {
    public static void main(String[] args) {
        HttpServletRequest request = null;
        boolean isRefreshParent = false;
        String result = "";
        String action = request.getParameter("action");
        String worker = request.getParameter("itemTaskWorker");
        try {
            if (action.equalsIgnoreCase("startManagerFactory")) {
                Client.getZooKeeperItemTaskDataManager().updateWorkerInfo(worker, true);
                isRefreshParent = true;
            } else if (action.equalsIgnoreCase("stopManagerFactory")) {
                Client.getZooKeeperItemTaskDataManager().updateWorkerInfo(worker, false);
                isRefreshParent = true;
            } else {
                throw new Exception("��֧�ֵĲ�����" + action);
            }
        } catch (Throwable e) {
            e.printStackTrace();
            result = "ERROR:" + e.getMessage();
            isRefreshParent = false;
        }
    }
}